home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7995 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: central.bldrdoc.gov!news
  2. From: "G. C. Straty" <straty@harrier.bldrdoc.gov>
  3. Newsgroups: comp.lang.pascal.misc,comp.lang.pascal.borland,comp.programming,comp.lang.misc,comp.lang.c,comp.lang.c++
  4. Subject: Re: Writing an expression evaluator
  5. Date: Fri, 16 Feb 1996 16:53:21 -0700
  6. Organization: NIST
  7. Message-ID: <312518F1.19E0@harrier.bldrdoc.gov>
  8. References: <311FEBD8.7305@cnj.digex.net>
  9. NNTP-Posting-Host: harrier.bldrdoc.gov
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6b (Win16; I)
  14.  
  15. Aristotle wrote:
  16. > Does anyone have any tips on how to go about writing an expression
  17. > evaluator(one complex enough to handle Trig. functions). I am writing a
  18. > program that uses expression and I would like to have the user be able to
  19. >  enter their own expressions and have my program implement them. Any help
  20. >  would be appreciated. Thanks in advance!
  21. >                                 John M. "Aristotle" De Cristofaro
  22.  
  23. Borland Pascal-3 (if you can remember that far back) included
  24. source code for what they called MicroCalc, sample code for a basic 
  25. spread sheet. In that code was a reasonably good function 
  26. interpreter and evaluator which I have used often with good results. 
  27. It will handle fairly complicated expressions as long as parens are
  28. not to deep. In digging through my stack of old 5.25 DDs I found I 
  29. still have it. If you are interested, I would be happy to make it
  30. available to you.
  31.  
  32. straty@bldrdoc.gov
  33.